﻿@model System.Tuple<string, string, Presentation.Web.Core.Pagination.IPagination>
<div class="pagination">
    @if (Model.Item3.PageNumber == 1)
    {
        <span class="page-link">
            @Html.ActionLink("<<", Model.Item1, Model.Item2, new { page = 1 }, null)</span>
    }
    @if (Model.Item3.HasPreviousPage)
    {
        <span class="page-link">
            @Html.ActionLink("< Prev", Model.Item1, Model.Item2, new { page = Model.Item3.PageNumber - 1 }, null)</span>
    }
    @if (Model.Item3.HasNextPage)
    {
        <span class="page-link">
            @Html.ActionLink("Next >", Model.Item1, Model.Item2, new { page = Model.Item3.PageNumber + 1 }, null)</span>
    }
    @if (Model.Item3.PageNumber <= Model.Item3.TotalPages)
    {
        <span class="page-link">
            @Html.ActionLink(">>", Model.Item1, Model.Item2, new { page = Model.Item3.TotalPages }, null)</span>
    }
    <div class="info" style="float: left;">
        <i>Page @(Model.Item3.TotalPages < Model.Item3.PageNumber ? 0 : Model.Item3.PageNumber)
            of @Model.Item3.TotalPages</i>
    </div>
</div>
